package com.canto.wanna.user.services.impl;

import com.canto.common.services.DataService;
import com.canto.wanna.user.dao.ResourceDao;
import com.canto.wanna.user.pojo.doo.ResourceDO;
import com.canto.wanna.user.pojo.entity.Resource;
import com.canto.wanna.user.pojo.query.ResourceQuery;
import com.canto.wanna.user.services.ResourceService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 模块资源表
 *
 * @Author jsryin
 * @Date 2021/7/14 7:55
 */
@Service
@Transactional(readOnly = true)
public class ResourceServiceImpl extends DataService<ResourceDao> implements ResourceService {

    @Override
    public ResourceDO get(ResourceQuery query) {
        return super.get(query);
    }

    public List<ResourceDO> findList(ResourceQuery resourceQuery) {
        return super.findList(resourceQuery);
    }

    @Transactional(readOnly = false, rollbackFor = Exception.class)
    public long save(Resource resource) {
        return super.save(resource);
    }

    @Transactional(readOnly = false, rollbackFor = Exception.class)
    public long delete(Resource resource) {
        return super.delete(resource);
    }

}
